<template>
	<view class="container">
		<!--头部start-->
		<view class="header">
			<u-status-bar></u-status-bar>
			<view class="index_header">
				<text :class="navIndex==0?'on':''" @click="checkIndex(0)">概览</text>
				<text :class="navIndex==1?'on':''" @click="checkIndex(1)">团队动态</text>
				<text :class="navIndex==2?'on':''" @click="checkIndex(2)">公告</text>
			</view>
		</view>
		<u-status-bar></u-status-bar>
		<!--头部end-->
		
			<!--概览start-->
			<view v-show="navIndex==0">
				<Views></Views>
			</view>
			<!--概览end-->
			
			<!--团队动态start-->
			<view v-show="navIndex==1">
				<teamNews ref="teamNews" :height="height"></teamNews>
			</view>
			<!--团队动态end-->
			
			<!--公告start-->
			<view v-show="navIndex==2">
				<newList ref="newList" :height="height"></newList>
			</view>
			<!--公告end-->
		
	</view>
</template>

<script>
//加载列表数据循环元素体文件：mescroll-swiper
import newList from "../index/news.vue";
import teamNews from "../index/team_dynamics.vue";
import Views from "../index/view.vue";
export default {
    components: {
        /***** mescroll S *****/
        //注册组件
        newList,teamNews,Views
        /***** mescroll E *****/
    },
    data() {
        return {
			navIndex: 0,
			height: '',
	
        }
    },
	onLoad(){
		this.height = uni.getSystemInfoSync().windowHeight - uni.upx2px(105) + 'px';
		console.log(this.height);
	},
    methods: {
		checkIndex(index) {
			console.log(index)
			this.navIndex = index;
		},
		changeName(idx){
			this.tabBarId=idx
		}
    }
}
</script>

<style scoped lang="scss">
	@import url("../../common/style.scss");
</style>